package com.tc.dispatch.csservice.gsservice;

import com.tc.dispatch.gsservice.ejb.GSServiceLocal;
import com.tc.dispatch.gsservice.action.GSCalcAction;
import com.tc.dispatch.csservice.log.BasicLog;
import com.tc.dispatch.csservice.util.ServiceLocator;
import com.tc.dispatch.gsservice.ejb.GSServiceLocalHome;
import com.tc.dispatch.csservice.util.JNDINames;




/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2008</p>
 * <p>Company: zju</p>
 * @author jakcyjia
 * @version 1.0
 */

public class SimpleGS extends BasicLog implements GSInterface {
  protected GSServiceLocal gss;
  protected GSCalcAction gsc;

  public SimpleGS() {
    try{
      ServiceLocator sl = new ServiceLocator();
      gss = ( (GSServiceLocalHome) sl.getEJBLocalHome(JNDINames.
	  GSSERVICE_EJB_LOCAL
	  )).create();
      gsc=gss.getGSCalc();
    }
    catch(Exception e)
    {

    }

  }
  public void setGSS(GSServiceLocal gss) {
    /**@todo Implement this com.tc.dispatch.csservice.gsservice.GSInterface method*/
    this.gss=gss;
    gsc=gss.getGSCalc();
    log.debug("setGSS sucess");
  }

}